
package com.insigma.business.qrcode.soldier.dao;


import com.insigma.business.qrcode.common.annotation.Crypt;
import com.insigma.business.qrcode.soldier.dto.CareSoldierVisitedRecordBSearcher;
import com.insigma.business.qrcode.soldier.dto.CareVisitUnifyRecordBO;
import com.insigma.business.qrcode.soldier.entity.CareSoldierVisitedRecordDO;
import com.insigma.business.qrcode.soldier.entity.DataStatsCDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface CareSoldierVisitedRecordDao {

    
    List<CareSoldierVisitedRecordDO> search(final CareSoldierVisitedRecordBSearcher innerSearcher);

    
    CareSoldierVisitedRecordDO get(final String id);

    
    Integer insert(final CareSoldierVisitedRecordDO careSoldierVisitedRecordDO);

    
    Integer update(final CareSoldierVisitedRecordDO careSoldierVisitedRecordDO);

    
    Integer delete(@Param("id") final String id,
                   @Param("modifierType") final String modifierType,
                   @Param("modifierId") final String modifierId);

    CareSoldierVisitedRecordDO getByFormInstId(String formInstId);

    Integer count(CareSoldierVisitedRecordBSearcher bSearcher);
    CareSoldierVisitedRecordDO getByBizId(String bizId);

    Integer countDifficulty(String adminAreaCode);

    List<DataStatsCDO> groupDifficultyVisitType(String cutdAreaCode);

    List<DataStatsCDO> groupDifficultyVisitAreaMap(@Param("areaLike")String areaLike, @Param("nextLevel")int nextLevel, @Param("levelLength")int levelLength);

    @Crypt(encryptParamIndex = {0})
    Integer countVisitedOfMonth(@Param("idCardNo")String idCardNo, @Param("month")String month);

    @Crypt(encryptParamIndex = {0})
    CareSoldierVisitedRecordDO getNewestByIdCardNo(String idCardNo);

    @Crypt(encryptParamIndex = {0}, returnDecrypt = true, returnDecryptFields ={"idCardNo", "mobile", "residentAddress"})
    List<CareVisitUnifyRecordBO> searchUnifyRecord(CareSoldierVisitedRecordBSearcher searcher);

    List<DataStatsCDO> groupVisitAreaMap(@Param("areaLike")String areaLike, @Param("nextLevel")int nextLevel, @Param("levelLength")int levelLength, @Param("evaluationFlag")Boolean evaluationFlag);

    List<DataStatsCDO> groupEvaluationSumMap(@Param("areaLike")String areaLike, @Param("nextLevel")int nextLevel, @Param("levelLength")int levelLength);

    Integer countByAreaAndTime(@Param("adminAreaCode")String adminAreaCode, @Param("time")String time);

    List<DataStatsCDO> groupEvaluationScoreMap(String adminAreaCode);
}
